home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / tools / czesc_1 / easyprocess / source / launch / checkkill.c < prev    next >
C/C++ Source or Header  |  1992-09-07  |  659b  |  46 lines

  1. #include <arpbase.h>
  2. #include <arp_proto.h>
  3. #include "Launch.h"
  4. #include "LaunchPriv.h"
  5.  
  6.  
  7. /*
  8.  *    NAME
  9.  *        CheckKill -- check if someone tried to kill you off.
  10.  *
  11.  *    SYNOPSIS
  12.  *        bool = CheckKill ()
  13.  *
  14.  *        BOOL CheckKill (void);
  15.  *
  16.  *    DESCRIPTION
  17.  *        Check if the KILL_PROCESS_FLAG has been raised.
  18.  *
  19.  *    INPUT
  20.  *        None.
  21.  *
  22.  *    OUTPUT
  23.  *        bool - non-zero if you were killed.
  24.  *
  25.  *    NOTE
  26.  *        Currently, we use the break C signal to kill.
  27.  *
  28.  *    HISTORY
  29.  *        1992/09/06    Pierre Baillargeon        Creation
  30.  *
  31.  *    SEE ALSO
  32.  *        KillProcess(), KillProcesses()
  33.  */
  34.  
  35. BOOL CheckKill (void)
  36. {
  37.     if (SetSignal (0L, 0L) & KILL_PROCESS_FLAG)
  38.     {
  39.         return 1;
  40.     }
  41.     else
  42.     {
  43.         return 0;
  44.     }
  45. }
  46.